//
//  LSZLyricBooksVC+LCAVPlay.m
//  JKFuYinProject
//
//  Created by jiukuyinyue on 2017/9/30.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZLyricBooksVC+LCAVPlay.h"
#import "LSZLyricBooksVC.h"

@implementation LSZLyricBooksVC (LCAVPlay)
-(void)creareAVPlay{
    // 安装通知
    [self setupNotifications];
}

- (void)dealloc {
    [self teardownNotifications];
}
#pragma mark - 通知处理 -
// 安装通知
- (void)setupNotifications {
    // 2. 安装播放歌曲发生变化的通知
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(musicPlayerPlayingSongDidChangedNotification:) name:LCMusicPlayerPlayingSongDidChangedNotification object:_LCPlayer];
}

// 卸载通知
- (void)teardownNotifications {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - 通知处理回调
///跳转到相关播放页
-(void)musicPlayerPlayingSongDidChangedNotification:(NSNotification *)notification{
//    JKSongsMessStatus *playingSong = notification.userInfo[kMusicPlayerPlayingSong];

    if (_LCPlayer.selectedIndex != self.lrcIndex) {
        [self changeSomeMessAndPlaySong:_LCPlayer.selectedIndex + 1];

    }
    
}

@end
